#include "parsefiles.h"
#include "QTextStream"
#include <QtXml>
#include <QXmlStreamReader>

//==========================================================================
//Разбор файлов html
int ParseFiles::ParsingHtml(QFile &fileSt1, QFile &fileSt2){

    QByteArray buff(fileSt1.readAll());
    QXmlStreamReader xmlReader1(buff);
    while(!xmlReader1.atEnd() && !xmlReader1.hasError()){
        auto tokType = xmlReader1.readNext();
        if (xmlReader1.error()){
            Error1(xmlReader1.errorString().toStdString().c_str());
            //xmlReader1.raiseError()
        }
        if(tokType == QXmlStreamReader::StartElement){
            Error1(xmlReader1.name().toString().toStdString().c_str());
        }
    }
    Error1("Выход из цикла.");

    fileSt1.close();
    fileSt2.close();

    return 0;
}
//=========================================================================
